Interview DesK

Click Here to share your interview experience!
< QualcommNAGARRO >

Amazon

(SDE-1)

Hi, last month i had my f2f interview wit Amazon for SDE! profile. Here is a compiled list of whatever i recall.
These are the questions asked :

#[Ths Question was asked in online Test.]
Given a list of 'N' coins, their values being in an array A[], return the minimum number of coins required to sum to 'S' (you can use as many coins you want). If it's not possible to sum to 'S', return -1

Sample Test Cases:
Input :
Coin denominations: { 1,3,5 }
Required sum (S): 11

Output :
3

#There are lots of string in a file. Find the longest string that could be made from the other strings in the file.
Eg.
there
the
after
thereafter
reaf

ans.
thereafter

#given two un-ordered list. You need to find the greatest common integer.

#Find the largest BST (binary search tree) in a given binary tree.

#find all elements in the loop of a linked list.( linked list may or may not have loop).

#Write a function to search for the existence of a string (target) in another string (str). The function takes two strings as the input and returns the index where the second string is found. If the target string cannot be found, then return -1.

#Design a singleton design pattern. (This is what i heard and understood)

#Given a sorted array consisting 0's and 1's. find the index of first '1'. write a complete program which takes less time complexity. and test all boundary conditions also.
Eg: If given array is 0,0,0,0,0,0,1,1,1,1 the out put should be 6. (I proposed a binary search approach)



HAVE YOUR SAY...

Click on 'Like' to receive all Job & Interview updates via Facebook.